#include"BinaryTree.h"


BTNode* BuyNode(BTDatatype x)
{
    BTNode* node =(BTNode*)malloc(sizeof(BTNode));
    assert(node);

    node->data = x;
    node->lift = NULL;
    node->right = NULL;
    return node;
}
void preorder(BTNode* root)
{
    if(root == NULL)
    {
        printf("# ");
        return ;
    }
    printf("%d ", root->data);
    preorder(root->lift);
    preorder(root->right);
}
void inorder(BTNode* root)
{
    if(root == NULL)
    {
        printf("# ");
        return ;
    }
    inorder(root->lift);
    printf("%d ", root->data);
    inorder(root->right);
}
void postorder(BTNode* root)
{
    if(root == NULL)
    {
        printf("# ");
        return ;
    }
    postorder(root->lift);
    postorder(root->right);
    printf("%d ", root->data);
}
